Attribute VB_Name = "Template"
' version <version number>
'
' sTemplate - does <specify functionality> with 1.strArgumentA and 2.intArgumentB
'
' fTemplate - does <specify functionality> with 1.strArgumentA and 2.intArgumentB
'      and returns <what>



' sTemplate wrapper
Sub sTemplateWrapper(strArguments)
On Error GoTo Error_Handler

    arrArguments = Split(strArguments, Chr(10))
    sTemplate arrArguments(0), CInt(arrArguments(1))
    
Error_Handler:
    ExcelBricks.lngGlobalErrNumber = Err.Number
    ExcelBricks.strGlobalErrDescription = Err.Description
End Sub


' fTemplate wrapper
Function fTemplateWrapper(strArguments)
On Error GoTo Error_Handler

    arrArguments = Split(strArguments, Chr(10))
    fTemplateWrapper = fTemplate(arrArguments(0), CInt(arrArguments(1)))
    
Error_Handler:
    ExcelBricks.lngGlobalErrNumber = Err.Number
    ExcelBricks.strGlobalErrDescription = Err.Description
End Function



' <specify subroutine functionality>
Sub sTemplate(strArgumentA, intArgumentB)
On Error GoTo Error_Handler

    ' <processing code>

Error_Handler:
    If Err.Number <> 0 Then
        strErrDescription = Err.Description
        lngErrNumber = Err.Number
    End If
    
    On Error Resume Next
    ' <subroutine specific cleanup>
    On Error GoTo 0

    If lngErrNumber <> 0 Then Err.Raise lngErrNumber, , strErrDescription
End Sub


' <specify function functionality>
Function fTemplate(strArgumentA, intArgumentB)
On Error GoTo Error_Handler

    ' <calculate return value>

Error_Handler:
    If Err.Number <> 0 Then
        strErrDescription = Err.Description
        lngErrNumber = Err.Number
    End If
    
    On Error Resume Next
    ' <function specific cleanup>
    On Error GoTo 0

    If lngErrNumber <> 0 Then Err.Raise lngErrNumber, , strErrDescription
End Function

